// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.


suite("test_cast_to_decimal32_9_8_from_str") {

    // This test case is generated from the correspoinding be UT test case,
    // update this case if the correspoinding be UT test case is updated,
    // e.g.: ../run-be-ut.sh --run --filter=FunctionCastToDecimalTest.* --gen_regression_case
    sql "drop table if exists test_cast_to_decimal32_9_8_from_str_24_nullable;"
    sql "create table test_cast_to_decimal32_9_8_from_str_24_nullable(f1 int, f2 string) properties('replication_num'='1');"
    sql """insert into test_cast_to_decimal32_9_8_from_str_24_nullable values (0, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(1, "-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(2, "0"),(3, "1"),(4, "8"),(5, "9"),(6, "0."),(7, "1."),(8, "8."),(9, "9."),(10, "-0"),(11, "-1"),(12, "-8"),(13, "-9"),(14, "-0."),(15, "-1."),(16, "-8."),(17, "-9."),(18, ".000000004"),(19, ".000000014"),
      (20, ".000000094"),(21, ".099999994"),(22, ".900000004"),(23, ".900000014"),(24, ".999999984"),(25, ".999999994"),(26, ".000000005"),(27, ".000000015"),(28, ".000000095"),(29, ".099999995"),(30, ".900000005"),(31, ".900000015"),(32, ".999999985"),(33, ".999999994"),(34, "-.000000004"),(35, "-.000000014"),(36, "-.000000094"),(37, "-.099999994"),(38, "-.900000004"),(39, "-.900000014"),
      (40, "-.999999984"),(41, "-.999999994"),(42, "-.000000005"),(43, "-.000000015"),(44, "-.000000095"),(45, "-.099999995"),(46, "-.900000005"),(47, "-.900000015"),(48, "-.999999985"),(49, "-.999999994"),(50, "00000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(51, "00000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(52, "00000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(53, "00999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(54, "09000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(55, "09000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(56, "09999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(57, "09999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(58, "10000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(59, "10000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (60, "10000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(61, "10999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(62, "19000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(63, "19000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(64, "19999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(65, "19999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(66, "80000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(67, "80000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(68, "80000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(69, "80999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(70, "89000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(71, "89000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(72, "89999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(73, "89999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(74, "90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(75, "90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(76, "90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(77, "90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(78, "99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(79, "99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (80, "99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(81, "99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(82, "00000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(83, "00000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(84, "00000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(85, "00999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(86, "09000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(87, "09000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(88, "09999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(89, "09999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(90, "10000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(91, "10000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(92, "10000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(93, "10999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(94, "19000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(95, "19000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(96, "19999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(97, "19999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(98, "80000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(99, "80000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (100, "80000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(101, "80999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(102, "89000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(103, "89000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(104, "89999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(105, "89999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(106, "90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(107, "90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(108, "90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(109, "90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(110, "99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(111, "99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(112, "99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(113, "99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(114, "-00000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(115, "-00000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(116, "-00000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(117, "-00999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(118, "-09000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(119, "-09000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (120, "-09999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(121, "-09999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(122, "-10000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(123, "-10000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(124, "-10000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(125, "-10999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(126, "-19000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(127, "-19000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(128, "-19999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(129, "-19999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(130, "-80000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(131, "-80000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(132, "-80000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(133, "-80999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(134, "-89000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(135, "-89000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(136, "-89999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(137, "-89999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(138, "-90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(139, "-90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (140, "-90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(141, "-90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(142, "-99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(143, "-99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(144, "-99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(145, "-99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(146, "-00000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(147, "-00000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(148, "-00000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(149, "-00999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(150, "-09000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(151, "-09000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(152, "-09999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(153, "-09999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(154, "-10000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(155, "-10000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(156, "-10000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(157, "-10999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(158, "-19000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(159, "-19000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (160, "-19999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(161, "-19999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(162, "-80000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(163, "-80000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(164, "-80000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(165, "-80999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(166, "-89000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(167, "-89000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(168, "-89999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(169, "-89999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(170, "-90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(171, "-90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(172, "-90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(173, "-90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(174, "-99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(175, "-99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(176, "-99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(177, "-99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100")
      ,(178, null);
    """

    sql "set enable_strict_cast=true;"
    qt_sql_24_strict 'select f1, cast(f2 as decimalv3(9, 8)) from test_cast_to_decimal32_9_8_from_str_24_nullable order by 1;'

    sql "set enable_strict_cast=false;"
    qt_sql_24_non_strict 'select f1, cast(f2 as decimalv3(9, 8)) from test_cast_to_decimal32_9_8_from_str_24_nullable order by 1;'

    sql "drop table if exists test_cast_to_decimal32_9_8_from_str_24_not_nullable;"
    sql "create table test_cast_to_decimal32_9_8_from_str_24_not_nullable(f1 int, f2 string) properties('replication_num'='1');"
    sql """insert into test_cast_to_decimal32_9_8_from_str_24_not_nullable values (0, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(1, "-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(2, "0"),(3, "1"),(4, "8"),(5, "9"),(6, "0."),(7, "1."),(8, "8."),(9, "9."),(10, "-0"),(11, "-1"),(12, "-8"),(13, "-9"),(14, "-0."),(15, "-1."),(16, "-8."),(17, "-9."),(18, ".000000004"),(19, ".000000014"),
      (20, ".000000094"),(21, ".099999994"),(22, ".900000004"),(23, ".900000014"),(24, ".999999984"),(25, ".999999994"),(26, ".000000005"),(27, ".000000015"),(28, ".000000095"),(29, ".099999995"),(30, ".900000005"),(31, ".900000015"),(32, ".999999985"),(33, ".999999994"),(34, "-.000000004"),(35, "-.000000014"),(36, "-.000000094"),(37, "-.099999994"),(38, "-.900000004"),(39, "-.900000014"),
      (40, "-.999999984"),(41, "-.999999994"),(42, "-.000000005"),(43, "-.000000015"),(44, "-.000000095"),(45, "-.099999995"),(46, "-.900000005"),(47, "-.900000015"),(48, "-.999999985"),(49, "-.999999994"),(50, "00000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(51, "00000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(52, "00000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(53, "00999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(54, "09000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(55, "09000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(56, "09999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(57, "09999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(58, "10000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(59, "10000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (60, "10000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(61, "10999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(62, "19000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(63, "19000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(64, "19999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(65, "19999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(66, "80000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(67, "80000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(68, "80000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(69, "80999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(70, "89000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(71, "89000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(72, "89999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(73, "89999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(74, "90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(75, "90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(76, "90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(77, "90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(78, "99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(79, "99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (80, "99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(81, "99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(82, "00000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(83, "00000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(84, "00000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(85, "00999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(86, "09000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(87, "09000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(88, "09999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(89, "09999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(90, "10000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(91, "10000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(92, "10000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(93, "10999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(94, "19000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(95, "19000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(96, "19999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(97, "19999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(98, "80000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(99, "80000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (100, "80000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(101, "80999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(102, "89000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(103, "89000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(104, "89999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(105, "89999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(106, "90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(107, "90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(108, "90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(109, "90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(110, "99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(111, "99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(112, "99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(113, "99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(114, "-00000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(115, "-00000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(116, "-00000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(117, "-00999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(118, "-09000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(119, "-09000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (120, "-09999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(121, "-09999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(122, "-10000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(123, "-10000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(124, "-10000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(125, "-10999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(126, "-19000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(127, "-19000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(128, "-19999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(129, "-19999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(130, "-80000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(131, "-80000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(132, "-80000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(133, "-80999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(134, "-89000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(135, "-89000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(136, "-89999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(137, "-89999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(138, "-90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(139, "-90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (140, "-90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(141, "-90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(142, "-99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(143, "-99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(144, "-99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(145, "-99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(146, "-00000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(147, "-00000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(148, "-00000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(149, "-00999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(150, "-09000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(151, "-09000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(152, "-09999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(153, "-09999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(154, "-10000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(155, "-10000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(156, "-10000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(157, "-10999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(158, "-19000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(159, "-19000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (160, "-19999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(161, "-19999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(162, "-80000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(163, "-80000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(164, "-80000000950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(165, "-80999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(166, "-89000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(167, "-89000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(168, "-89999999850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(169, "-89999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(170, "-90000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(171, "-90000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(172, "-90000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(173, "-90999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(174, "-99000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(175, "-99000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(176, "-99999999840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(177, "-99999999940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100");
    """

    sql "set enable_strict_cast=true;"
    qt_sql_24_strict 'select f1, cast(f2 as decimalv3(9, 8)) from test_cast_to_decimal32_9_8_from_str_24_not_nullable order by 1;'

    sql "set enable_strict_cast=false;"
    qt_sql_24_non_strict 'select f1, cast(f2 as decimalv3(9, 8)) from test_cast_to_decimal32_9_8_from_str_24_not_nullable order by 1;'

}